﻿#include "ThresholdShaderDialog.h"

ThresholdShaderDialog::ThresholdShaderDialog(QWidget* parent)
	: QDialog(parent)
{
	ui.setupUi(this);
	ui.slider->setValue(slideValue * 100);
}

void ThresholdShaderDialog::OnSlidePressed()
{

}
void ThresholdShaderDialog::OnSlideReleased()
{
	emit setThresholdValue(slideValue);
}

void ThresholdShaderDialog::OnSlideValueChanged(int value)
{
	slideValue = value / 100.0f;
	ui.m_value->setText(QString::asprintf("当前阈值：%.2f", slideValue));
}

ThresholdShaderDialog::~ThresholdShaderDialog()
{
}
